package com.kalua.list.dbaccess;

import java.util.Collection;
import java.util.Map;

import com.kalua.list.domainmodel.Identifiable;
import com.kalua.list.domainmodel.Identifier;

public interface SimpleCRUDDAO <T extends Identifiable<K>, K extends Identifier>{
	K create(T object);
	void create(Map<K,T> entities);
	
	void delete(T object);
	void delete(K key);
	void deleteAll(Collection<K> keys);
	
	T read(K id);
	Map<K, T> readAll(Collection<K> keys);
	Map<K, T> readAll();
	
	void update(T object);
	void update(Map<K, T> entities);	

	boolean exists(K identifier);
}
